﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace Synchros
{
    static class Program
    {
        ///// <summary>
        ///// 应用程序的主入口点。
        ///// </summary>
        //[STAThread]
        //static void Main()
        //{
        //    Application.EnableVisualStyles();
        //    Application.SetCompatibleTextRenderingDefault(false);
        //    Application.Run(new FrmCenter());
        //}


        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            bool createdNew = false;
            System.Threading.Mutex mutex = new System.Threading.Mutex(true, "Synchros", out createdNew);
            if (createdNew)
            {
                mutex.ReleaseMutex();
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                //Application.Run(new Form1());
                Application.Run(new FrmCenter(args));
            }
            else
            {
                MessageBox.Show("实例已经在运行中了!");
            }
            
        }
    }
}
